#pragma once

#include <utility>

#include <Windows.h>

namespace Otl { namespace Win32
{
	class CEvent final
	{
	public:
		CEvent();
		~CEvent();

		CEvent(CEvent && other) _NOEXCEPT
			: m_handle{ std::move(other.m_handle) }
		{
			other.m_handle = nullptr;
		}

		CEvent & operator=(CEvent && other) _NOEXCEPT
		{
			m_handle = std::move(other.m_handle);
			other.m_handle = nullptr;
		}

		CEvent(const CEvent &) = delete;
		CEvent & operator=(const CEvent &) = delete;

		HANDLE Handle() const
		{
			return m_handle;
		}

	private:
		HANDLE m_handle;
	};
}}